<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>十月，写给大地与晨光的信</title>
    <style type="text/css">
        @font-face {
            font-family: 'MyFont';
            src: url('../font/MyFont-Regular.ttf') format('truetype');
            font-weight: normal;
            font-style: normal;
            font-display: swap;
        }
    </style>
</head>
<body style="background-color: #FFF9F2; font-family: 'MyFont', serif; color: #374151;">
    <div style="width: 100%; height: 1.5px; background: linear-gradient(to right, #FFC898, #FFD700, #FFC898);"></div>

    <div style="width: 100%; margin: 0 auto;" contenteditable="true">
        <header style="margin-bottom: 2.5rem; text-align: center;">
            <h1 style="font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; color: #8B5A2B; margin-bottom: 0.75rem; text-shadow: 0 2px 4px rgba(0,0,0,0.1);">十月，写给大地与晨光的信</h1>
            <p style="color: #4B5563; font-style: italic; font-size: clamp(0.9rem, 1.5vw, 1.1rem);">—— 记祖国的第七十六个生辰</p>
            <div style="width: 6rem; height: 0.5px; background-color: #FFC898; margin: 1.25rem auto 0; border-radius: 9999px;"></div>
        </header>

        <main style="max-width: 65ch; margin: 0 auto; color: #374151; line-height: 1.625; font-size: 18px; margin-top: 0; margin-bottom: 0; margin-left: auto; margin-right: auto;">
            <p>风是十月的先行客。</p>
            
            <p>它漫过塞北的胡杨林，把金黄的碎光撒在沙丘上；掠过江南的稻田，让稻穗垂着饱满的阳光。</p>
            
            <p>当这阵风掠过肩头时，我忽然懂了——又一个与祖国并肩的秋天，来了。</p>
            
            <p>人们总说国庆是红色的。</p>
            
            <p>是广场上舒展的国旗，是孩子脸颊的贴纸，是老党员胸前亮闪闪的徽章。</p>
            
            <p>可若你静下心看，这红色里藏着万千色彩。</p>
            
            <p>是敦煌壁画的赭石色，沉淀着千年文明；是港珠澳大桥的银灰色，架起山海相连的路。</p>
            
            <p>还有乡村屋檐下的辣椒红，一串串挂着，满是烟火气的日子。</p>
            
            <div style="margin-top: 2rem; margin-bottom: 2rem; padding: 1.25rem; background-color: rgba(255, 235, 216, 0.4); border-radius: 0.5rem; border-left: 3px solid #FFC898;">
                <p style="font-style: italic; text-align: center; color: #4B5563;">“家国从不是遥远的词汇，是有人守着边疆的星，有人护着巷尾的灯。”</p>
            </div>
            
            <p>我们总在宏大叙事里寻找祖国，却忘了它藏在日常的细节里。</p>
            
            <p>早高峰地铁上，年轻人戴着耳机背单词，笔尖在笔记本上不停划动。</p>
            
            <p>菜市场摊主称完菜，总会多塞一根小葱，说“回家炒着香”，小葱沾着泥土的温气。</p>
            
            <p>边疆的雪地里，战士蹲下身，把界碑上“中国”二字擦得发亮，睫毛上结着白霜。</p>
            
            <p>留学生在异国街头听见乡音，脚步会突然加快，像找到了久违的光。</p>
            
            <p>这些细碎的瞬间，都是祖国的心跳。</p>
            
            <p>七十六个春秋不算长，在文明长河里只是一朵浪花。</p>
            
            <p>可这七十六年又足够厚重——让荒原长出高楼，让土路变成坦途。</p>
            
            <p>让“中国制造”变成“中国创造”，让爷爷辈“能吃饱就好”的心愿，成了我们“能追梦想、能看世界”的日常。</p>
            
            <p>这个十月，我没奔赴远方。</p>
            
            <p>去楼下公园转了转，孩子们追着风筝跑，父母的笑声落在风里，软软的。</p>
            
            <p>回家泡了壶茶，翻出老相册。十年前的街道还带着旧模样，如今早已换了新颜。</p>
            
            <p>风再吹过时，我忽然明白：我们庆祝的不只是节日。</p>
            
            <p>是每一个认真生活的人，每一段向前走的时光，每一寸满是希望的土地。</p>
            
            <p style="text-align: right; font-weight: 600; margin-top: 1.5rem; color: #8B5A2B;">愿山河常盛，愿你我皆安。</p>
        </main>

        <footer style="margin-top: 3rem; text-align: center; color: #6B7280; font-size: 0.75rem;">
            <p>2025年10月1日 于晨光里</p>
            <div style="display: flex; justify-content: center; gap: 0.5rem; margin-top: 0.75rem;">
                <span style="width: 0.5rem; height: 0.5rem; border-radius: 9999px; background-color: #FFD700;"></span>
                <span style="width: 0.5rem; height: 0.5rem; border-radius: 9999px; background-color: #FFD700;"></span>
                <span style="width: 0.5rem; height: 0.5rem; border-radius: 9999px; background-color: #FFD700;"></span>
            </div>
        </footer>
    </div>

    <div style="position: fixed; right: 1.25rem; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 1rem; z-index: 50;">
        <button id="font-enlarge" style="width: 2.75rem; height: 2.75rem; background-color: white; border-radius: 9999px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); display: flex; align-items: center; justify-content: center; color: #8B5A2B; font-size: 1.25rem; font-weight: 700; transition: all 300ms ease-in-out; outline: none;" onmouseover="this.style.backgroundColor='#FFC898'; this.style.transform='scale(1.05)';" onmouseout="this.style.backgroundColor='white'; this.style.transform='scale(1)';">
            +
        </button>
        <button id="font-shrink" style="width: 2.75rem; height: 2.75rem; background-color: white; border-radius: 9999px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); display: flex; align-items: center; justify-content: center; color: #8B5A2B; font-size: 1.25rem; font-weight: 700; transition: all 300ms ease-in-out; outline: none;" onmouseover="this.style.backgroundColor='#FFC898'; this.style.transform='scale(1.05)';" onmouseout="this.style.backgroundColor='white'; this.style.transform='scale(1)';">
            -
        </button>
        <button id="export-image" style="width: 2.75rem; height: 2.75rem; background-color: white; border-radius: 9999px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); display: flex; align-items: center; justify-content: center; color: #8B5A2B; font-size: 1.25rem; transition: all 300ms ease-in-out; outline: none;" onmouseover="this.style.backgroundColor='#FFC898'; this.style.transform='scale(1.05)';" onmouseout="this.style.backgroundColor='white'; this.style.transform='scale(1)';">
            ⬇
        </button>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js"></script>
    <script>
        let baseFontSize = 16;
        const mainContent = document.querySelector('main');
        
        document.getElementById('font-enlarge').addEventListener('click', () => {
            if (baseFontSize < 24) {
                baseFontSize += 2;
                mainContent.style.fontSize = `${baseFontSize}px`;
            }
        });

        document.getElementById('font-shrink').addEventListener('click', () => {
            if (baseFontSize > 14) {
                baseFontSize -= 2;
                mainContent.style.fontSize = `${baseFontSize}px`;
            }
        });

        document.getElementById('export-image').addEventListener('click', () => {
            const target = document.querySelector('div[contenteditable="true"]');
            html2canvas(target, {
                useCORS: true,
                backgroundColor: null,
                scale: 2
            }).then(canvas => {
                const link = document.createElement('a');
                link.download = `十月写给大地的信_${new Date().getMonth()+1}月${new Date().getDate()}日.png`;
                link.href = canvas.toDataURL('image/png');
                link.click();
            });
        });
    </script>
</body>
</html>